{extend name="public/base"/}
{block name="body"}
<h2 class="text-center">
	创建数据库
</h2>
<form method="post" target="_self" id="form-config">
	<div class="create-database">
		<h2>
			数据库连接信息
		</h2>
		<table class="table-hover table">
			<tr>
				<td>
					<select class="form-control" name="database[type]">
						<option>
							mysql
						</option>
						<option>
							mysqli
						</option>
					</select>
				</td>
				<td>
					数据库连接类型，服务器支持的情况下建议使用mysql
				</td>
			</tr>
			<tr>
				<td>
					<input class="form-control" name="database[hostname]" type="text" value="127.0.0.1">
					
				</td>
				<td>
					<span>
						数据库服务器，数据库服务器IP，一般为127.0.0.1，使用localhost可能导致网站速度变慢
					</span>
				</td>
			</tr>
			<tr>
				<td>
					<input class="form-control" name="database[database]" type="text" value="" required="required" placeholder="数据库名必填">
					
				</td>
				<td>
					<span>
						数据库名
					</span>
				</td>
			</tr>
			<tr>
				<td>
					<input class="form-control" name="database[username]" type="text" value="" required="required" placeholder="数据库用户名必填">
					
				</td>
				<td>
					<span>
						数据库用户名
					</span>
				</td>
			</tr>
			<tr>
				<td>
					<input class="form-control" name="database[password]" type="password" value="" required="required" placeholder="数据库密码必填">
					
				</td>
				<td>
					<span>
						数据库密码
					</span>
				</td>
			</tr>
			<tr>
				<td>
					<input class="form-control" name="database[hostport]" type="text" value="3306" required="required" placeholder="数据库端口必填">
					
				</td>
				<td>
					<span>
						数据库端口，数据库服务连接端口，一般为3306
					</span>
				</td>
			</tr>
			<tr>
				<td>
					<input class="form-control" name="database[prefix]" type="text" value="zanpiancms_" required="required" placeholder="数据库前缀">
				</td>
				<td>
					<span>格式zanpiancms_ 数据表前缀，同一个数据库运行多个系统时请修改为不同的前缀</span>
                    
				</td>
			</tr>   
			<tr>
				<td>
					<select class="form-control" name="database[cover]">
          <option value="1">是</option>
          <option value="0">否</option>
					</select>
				</td>
				<td>是否覆盖数据库</td>
			</tr>                 
		</table>
      <div class="btn btn-primary ajax-post"  form="#form-config" style="margin-left:10px;" href="{:url('checkdb')}">测试数据库连接</div>       
	</div>
	<div class="create-database">
		<h2>超级管理帐号信息</h2>
		<table class="table-hover table">
			<tr>
				<td>
					<input class="form-control" name="admin[member_name]" type="text" value="admin" required="required" placeholder="管理用户名必填">
					
				</td>
				<td>
					<span>
						用户名(
						<span class="text-danger">
							英文+数字，严禁中文与特殊字符
						</span>
						)
					</span>
				</td>
			</tr>
			<tr>
				<td>
					<input class="form-control" name="admin[member_password]" type="password" value="" required="required" placeholder="管理密码必填">
					
				</td>
				<td>
					<span>
						密码
					</span>
				</td>
			</tr>
			<tr>
				<td>
					<input class="form-control" name="admin[member_repassword]" type="password" value="" required="required" placeholder="管理确认密码必填">
					
				</td>
				<td>
					<span>
						确认密码
					</span>
				</td>
			</tr>
			<tr>
				<td>
					<input class="form-control" name="admin[member_email]" type="text" value="admin@admin.com">
					
				</td>
				<td>
					<span>
						邮箱，请填写正确的邮箱便于收取提醒邮件
					</span>
				</td>
			</tr>
		</table>
		<div>
		</div>
	</div>
</form>
{/block}
{block name="footer"}
<div class="text-center">
	<button class="btn btn-primary" id="submit" onclick="$('form').submit();return false;" type="button">
		下一步
	</button>
	<a class="btn btn-default" href="{:url('install/index/check')}">
		上一步
	</a>
</div>
{/block}
